\doxysection{bsp\+\_\+usb.\+h}
\hypertarget{bsp__usb_8h_source}{}\label{bsp__usb_8h_source}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/bsp/usb/bsp\_usb.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/bsp/usb/bsp\_usb.h}}
\mbox{\hyperlink{bsp__usb_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ "{}usb\_device.h"{}}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ "{}usbd\_cdc.h"{}}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ "{}usbd\_conf.h"{}}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ "{}usbd\_desc.h"{}}}
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ "{}usbd\_cdc\_if.h"{}}}
\DoxyCodeLine{00018\ }
\DoxyCodeLine{00019\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00020\ \{}
\DoxyCodeLine{00021\ \ \ \ \ USBCallback\ tx\_cbk;}
\DoxyCodeLine{00022\ \ \ \ \ USBCallback\ rx\_cbk;}
\DoxyCodeLine{00023\ \}\ \mbox{\hyperlink{struct_u_s_b___init___config__s}{USB\_Init\_Config\_s}};}
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00025\ \textcolor{comment}{/*\ @note\ 虚拟串口的波特率/校验位/数据位等动态可变,取决于上位机的设定\ */}}
\DoxyCodeLine{00026\ \textcolor{comment}{/*\ 使用时不需要关心这些设置(作为从机)\ */}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ uint8\_t\ *USBInit(\mbox{\hyperlink{struct_u_s_b___init___config__s}{USB\_Init\_Config\_s}}\ usb\_conf);\ \textcolor{comment}{//\ bsp初始化时调用会重新枚举设备}}
\DoxyCodeLine{00029\ }
\DoxyCodeLine{00030\ \textcolor{keywordtype}{void}\ USBTransmit(uint8\_t\ *buffer,\ uint16\_t\ len);\ \textcolor{comment}{//\ 通过usb发送数据}}

\end{DoxyCode}
